//rename to Events.groovy to see the effect

/**
 * Defined event listeners as simple as by name: event{event_name} = {...}.
 * TO know more listenable built-in events, browse {grails_home}/scripts.
 * And it is possible to listen to our customed events.
 * @author jeff
 *
 */

eventCleanStart = {
	println "###### About to clean"
}

eventCleanEnd = {
	println "###### Cleaning end"
}

//this effects only when using grails command to create artifacts(say "grails create-domain-class", cannot detect the ones created by IDE or anything else
eventCreatedFile = {fileName ->
	//"svn add $fileName".execute()
	println "###### $fileName has been added to svn"
}

//listen to a custom event defined in {project_home}/scripts
eventTestClean = {timestamp ->
	println "###### Start test clean on $timestamp"
}